﻿using System;

namespace 练习三
{
    class Program
    {
        static void Main(string[] args)
        {
            //字符串常量
            string a = @"hello, world";
            Console.WriteLine(a);
            //定义常量

            hahaha mC = new hahaha(11, 22);
            Console.WriteLine("x = {0}, y = {1}", mC.x, mC.y);
            Console.WriteLine("c1 = {0}, c2 = {1}",
             hahaha.c1, hahaha.c2);



            Console.WriteLine("----------------------");
            //if  
            Console.WriteLine("你今年多大了？");
            string age = Console.ReadLine();
            int age1 = Convert.ToInt32(age);
            bool result = age1 > 23;
            if (result)
            {
                Console.WriteLine("可以结婚了");

            }
            Console.WriteLine("-------------------------------------------------");
            //if else

            Console.WriteLine("你今年多大了？");
            string age2 = Console.ReadLine();
            int age3 = Convert.ToInt32(age2);
            bool result1 = age3 > 23;
            if (result1)
            {
                Console.WriteLine("可以结婚了");

            }
            else
            {
                Console.WriteLine("小屁孩想啥呢？");
            }

            Console.WriteLine("-------------------");
            //if else if


            Console.WriteLine("请输入认识妹子的个数");
            int b = Convert.ToInt32(Console.ReadLine());
            if (b > 20)
            {
                Console.WriteLine("你个大渣男");
            }
            else if (b > 15)
            {
                Console.WriteLine("你个小渣男");
            }
            else if (b > 5)
            {
                Console.WriteLine("人缘还不错哦");

            }
            else
            {
                Console.WriteLine("要加油哦！");
            }


            Console.WriteLine("------------------------------------------------------------" +
                "");
            //switch语句


            Console.WriteLine("请输入学生考试的成绩（0~100的整数）");
            int points = int.Parse(Console.ReadLine());
            switch (points / 10)
            {
                case 10:
                    Console.WriteLine("优秀");
                    break;
                case 9:
                    Console.WriteLine("优秀");
                    break;
                case 8:
                    Console.WriteLine("良好");
                    break;
                case 7:
                    Console.WriteLine("及格");
                    break;
                case 6:
                    Console.WriteLine("及格");
                    break;
                default:
                    Console.WriteLine("不及格");
                    break;
            }




        }
        class hahaha

        {
            public int x;
            public int y;
            public const int c1 = 5;
            public const int c2 = c1 + 5;

            public hahaha(int p1, int p2)
            {
                x = p1;
                y = p2;
            }
        }
    }
}
